<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>

<script type="text/javascript">
	function initializeAssistantFunction() {
		new JustTheTip('.needs-tip', {
			tip_html : '增强的提示.',
			show_delay : 0,
			hide_delay : 100,
			fade_in_duration : 500,
			fade_out_duration : 1000,
			position : {
				position : 'upperRight',
				edge : 'upperLeft'
			},

			onTipShown : function(tip, elem, jtt) {
				//tip.set('html', elem.get('html') + " tip");
			},

			// 判定什么情况下显示提示
			// 
			shouldShowTip : function(elem) {
				// 在元素的文本中含有Tip一词的情况下，才显示提示
				return elem.get('html').test(/Tip/);
			}
		});

		new MUI.mooRatings(document.id('rating'), {
			showSelectBox : false,
			container : null,
			defaultRating : 4
		});

		new MUI.mooElementScroller(document.id('somelist'),{
			resize: {
				enabled: false,
				offset: 80
			},
			slow: 2
		});

		new MUI.DynamicTextarea(document.id('myInput'), {
			minRows:2
			});
	}

	// 将本页面的初始化方法加入初始化队列中
	MUI.myChain.chain(initializeAssistantFunction()).callChain();
</script>
</head>
<body>
<table cellpadding="5" cellspacing="5" border="1" width="95%">
	<thead></thead>
	<tbody>
		<tr>
			<td class="af_description">提示增强：</td>
			<td class="needs-tip">Tip提示增强，将鼠标移上</td>
		</tr>
		<tr>
			<td class="af_description">评分：</td>
			<td class="needs-tip"><select name="rating" id="rating">
				<option value="1">1</option>
				<option value="2">2</option>
				<option value="3">3</option>
				<option value="4">4</option>
				<option value="5">5</option>
			</select>
			<div id="star"></div>
			</td>
		</tr>
		<tr>
			<td class="af_description">滚动效果(未实现):</td>
			<td>
				<ul id="somelist">
					<li>One</li>
					<li>Two</li>
					<li>Three</li>
					<li>Four</li>
					<li>Five</li>
					<li>Six</li>
					<li>Seven</li>
				</ul>
				<div id="element"></div>
			</td>
		</tr>
		<tr>
			<td class="af_description">动态Textarea:</td>
			<td>
				<textarea id="myInput" rows="1" cols="200" ></textarea>
			</td>
		</tr>
	</tbody>
	<tfoot></tfoot>
</table>
</body>
</html>